package initialize

import (
	"github.com/go-redsync/redsync/v4"
	"github.com/go-redsync/redsync/v4/redis/goredis/v9"
	goredislib "github.com/redis/go-redis/v9"
	"kuangstudy-mall/srvs/stocks-srv/global"
)

func InitRedisLock() {
	client := goredislib.NewClient(&goredislib.Options{
		Addr:     "localhost:6379",
		Password: "",
	})
	pool := goredis.NewPool(client) // or, pool := redigo.NewPool(...)
	global.ReisSync = redsync.New(pool)
}
